#include "SharedFunctions.h"

D3DXVECTOR3 VectorMatrixMultiply(D3DXMATRIX matrix, D3DXVECTOR3 vector)
{
	//Multiply the return vector by a matrix
	D3DXVECTOR3 returnVector;
	returnVector.x = 0.f;
	returnVector.y = 0.f;
	returnVector.z = 0.f;

	returnVector.x = -(vector.x * matrix._11 + vector.y * matrix._12 + vector.z * matrix._13);

	returnVector.y = -(vector.x * matrix._21 + vector.y * matrix._22 + vector.z * matrix._23);

	returnVector.z = (vector.x * matrix._31 + vector.y * matrix._32 + vector.z * matrix._33);

	return returnVector;
}